// 这里存放本地图标，在 src/layout/index.vue 文件中加载，避免在首启动加载
import { getSvgInfo } from "@pureadmin/utils";
import { addIcon } from "@iconify/vue/dist/offline";

// https://icon-sets.iconify.design/ep/?keyword=ep
import EpHomeFilled from "~icons/ep/home-filled?raw";
import EpTickets from "~icons/ep/tickets?raw";
import EpMoon from "~icons/ep/moon?raw";
import EpPicture from "~icons/ep/picture?raw";
import EpInfoFilled from "~icons/ep/info-filled?raw";
// https://icon-sets.iconify.design/ri/?keyword=ri
import RiSearchLine from "~icons/ri/search-line?raw";
import RiInformationLine from "~icons/ri/information-line?raw";
import EpCircleCheckFilled from "~icons/ep/circle-check-filled?raw";
import EpPosition from "~icons/ep/position?raw";
import EpChromeFilled from "~icons/ep/chrome-filled?raw";
import CatppuccinHttp from "~icons/catppuccin/http?raw";
const icons = [
  // Element Plus Icon: https://github.com/element-plus/element-plus-icons
  ["ep/home-filled", EpHomeFilled],
  ["ep/circle-check-filled", EpCircleCheckFilled],
  ["ep/tickets", EpTickets],
  ["ep/moon", EpMoon],
  ["ep/info-filled", EpInfoFilled],
  ["ep/picture", EpPicture],
  ["ep/position", EpPosition],
  ["ep/chrome-filled", EpChromeFilled],
  // Remix Icon: https://github.com/Remix-Design/RemixIcon
  ["ri/search-line", RiSearchLine],
  ["ri/information-line", RiInformationLine],
  ["catppuccin/http", CatppuccinHttp]
];

// 本地菜单图标，后端在路由的 icon 中返回对应的图标字符串并且前端在此处使用 addIcon 添加即可渲染菜单图标
icons.forEach(([name, icon]) => {
  addIcon(name as string, getSvgInfo(icon as string));
});
